const DetailsModel = require('../modules/DetailsModel')
module.exports = {
    //详情页
    post_detailspage: async function (req, res) {
        let resultArr = [];
        await DetailsModel.detailspage(req)
            .then(res => resultArr = res);
        res.send(resultArr)
    },

    //获取课程章节
    post_coursechapters: async function(req,res) {
        let resultArr = [];
        await DetailsModel.coursechapters(req)
            .then(res => {
                // console.log('===>',res);
                for (var i of res) {
                    resultArr.push(i);
                }
            });
        res.send(resultArr)
    }
}